<%@ Control Language="C#" AutoEventWireup="true" CodeFile="YCodeGrid.ascx.cs" Inherits="forums_controls_administration_YCodeGrid" %>
<asp:GridView runat="server" ID="gridItems" AutoGenerateColumns="false" Width="100%" ShowHeader="False">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkUp"
                    Text="Up"
                    OnCommand="Move"
                    CommandArgument='<%# Eval("ID") %>'
                    CommandName="up" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkItem"
                    CommandArgument='<%# Eval("ID") %>'
                    OnCommand="SelectItem"
                    Text='<%# Helpers.StringHelper.SafeFormat("{0} ({1})", Eval("Code"), Eval("TotalArguments")) %>' />
                (<asp:LinkButton runat="server" ID="lnkDelete"
                    CommandArgument='<%# Eval("ID") %>'
                    OnCommand="DeleteItem"
                    Text='Delete' />)
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />            
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkDown"
                    Text="Down"
                    OnCommand="Move"
                    CommandArgument='<%# Eval("ID") %>'
                    CommandName="down" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Right" />
        </asp:TemplateField>
    </Columns>
</asp:GridView>